package com.wlz.ota.util;

/**
 * <p>
 * 状态码
 * </p>
 */
public enum ResponseEnum {
    SUCCESS(0, "请求成功"),
    ERROR(-1, "请求失败,请稍后重试"),
    SYSTEM_ERROR(-2, "系统内部错误"),
    BAD_REQUEST(-3, "请求参数错误"),
    NOT_FOUND(-4, "找不到请求路径"),
    CONNECTION_ERROR(-5, "网络连接请求失败"),
    DATABASE_ERROR(-6, "数据库异常"),
    BOUND_STATEMENT_NOT_FOUNT(-7, "mybatis找不到方法"),
    UNSUPPORTED_CHARACTERS(-8, "非法字符"),
    NOT_PERMISSION(102, "您没有该操作的权限，请联系管理员！"),
    EXTERNAL_USER_BIND_PHONE(105, "您需要短信验证登录，请联系管理员绑定手机号！"),
    EXTERNAL_USER_PHONE(106, "您需要短信验证登录！"),
    LOGIN_PASSWORD_ERROR(201, "账号或密码错误"),
    LOGIN_IS_DISABLED(202, "登录账号被禁用,请联系管理员"),
    LOGIN_IS_LOCKED(203, "登录账号被锁定,请联系管理员");

    private Integer code;
    private String message;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
